package com.itheima.service.Impl;

import com.itheima.dao.LogDao;
import com.itheima.domain.Log;
import com.itheima.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

@Service
public class LogServiceImpl implements LogService {

    @Autowired
    private LogDao logDao;

    public void log(String in , String out , Double money) {
        Log log = new Log();
        log.setDateTime(LocalDateTime.now());
        log.setInfo("账户" + in + "转账" + money + "元" + "到" + out);

        logDao.log(log);
    }
}
